home *** CD-ROM | disk | FTP | other *** search
/ EuroCD 3 / EuroCD 3.iso / Programming / SecalDemo / Inc / utility / pack.inc < prev    next >
Text File  |  1998-06-24  |  1KB  |  38 lines

  1. include "inc/exec/types.inc";
  2. include "inc/utility/tagitem.inc";
  3.  
  4. def PSTB_SIGNED = 31;
  5. def PSTB_UNPACK = 30;
  6. def PSTB_PACK = 29;
  7. def PSTB_EXISTS = 26;
  8.  
  9. def PSTF_SIGNED = (1<<PSTB_SIGNED);
  10. def PSTF_UNPACK = (1<<PSTB_UNPACK);
  11. def PSTF_PACK = (1<<PSTB_PACK);
  12.  
  13. def PSTF_EXISTS = (1<<PSTB_EXISTS);
  14.  
  15. def PKCTRL_PACKUNPACK = $00000000;
  16. def PKCTRL_PACKONLY = $40000000;
  17. def PKCTRL_UNPACKONLY = $20000000;
  18.  
  19. def PKCTRL_BYTE = $80000000;
  20. def PKCTRL_WORD = $88000000;
  21. def PKCTRL_LONG = $90000000;
  22.  
  23. def PKCTRL_UBYTE = $00000000;
  24. def PKCTRL_UWORD = $08000000;
  25. def PKCTRL_ULONG = $10000000;
  26.  
  27. def PKCTRL_BIT = $18000000;
  28. def PKCTRL_FLIPBIT = $98000000;
  29.  
  30. def PACK_STARTTABLE(tagbase) = (tagbase);
  31. def PACK_NEWOFFSET(tagbase) = (-1),(tagbase);
  32. def PACK_ENDTABLE = 0;
  33. def PACK_ENTRY(tagbase,tag,type,field,control) = (control|((tag-tagbase)<<16)|PK_CALCOFFSET(type,field));
  34. def PACK_BYTEBIT(tagbase,tag,type,field,control,flags) = (control|((tag-tagbase)<<16)|PK_CALCOFFSET(type,field)|(PK_BITNUM(flags)<<13));
  35. def PACK_WORDBIT(tagbase,tag,type,field,control,flags) = (control|((tag-tagbase)<<16)|(PK_CALCOFFSET(type,field)+PK_WORDOFFSET(flags))|((PK_BITNUM(flags)&7)<<13));
  36. def PACK_LONGBIT(tagbase,tag,type,field,control,flags) = (control|((tag-tagbase)<<16)|(PK_CALCOFFSET(type,field)+PK_LONGOFFSET(flags))|((PK_BITNUM(flags)&7)<<13));
  37.  
  38.